<html>
<head><meta charset="utf-8"><title>how does ```ignore work · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html">how does ```ignore work</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221083893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221083893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221083893">(Dec 28 2020 at 19:08)</a>:</h4>
<div class="codehilite"><pre><span></span><code>    /// ```ignore (internal compiler representation so lifetime syntax is invalid)
    /// &lt;T as Foo&lt;&#39;0&gt;&gt;::Item: &#39;1
    /// ```
</code></pre></div>
<p>This produces an error, should it ?</p>



<a name="221083913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221083913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Poliorcetics <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221083913">(Dec 28 2020 at 19:08)</a>:</h4>
<p>The error is <code>= note: error from rustc: lifetimes cannot start with a number</code></p>



<a name="221083953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221083953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221083953">(Dec 28 2020 at 19:09)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/30032">https://github.com/rust-lang/rust/issues/30032</a></p>



<a name="221083989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221083989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221083989">(Dec 28 2020 at 19:10)</a>:</h4>
<p>I would just use <code>text</code> instead</p>



<a name="221295203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221295203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221295203">(Dec 31 2020 at 15:03)</a>:</h4>
<p>But in any case, it is strange that the compiler is still testing it. I don't think we should do that... I'll send a fix for it then.</p>



<a name="221295230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221295230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221295230">(Dec 31 2020 at 15:03)</a>:</h4>
<p><span class="user-mention" data-user-id="210316">@GuillaumeGomez</span> that's because we use the compiler for syntax highlighting</p>



<a name="221295236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221295236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221295236">(Dec 31 2020 at 15:03)</a>:</h4>
<p>Oh damn</p>



<a name="221295239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221295239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221295239">(Dec 31 2020 at 15:03)</a>:</h4>
<p>I don't think it will be an easy fix - maybe you could ignore the errors? but it still wouldn't be highlighted as Rust</p>



<a name="221295256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221295256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221295256">(Dec 31 2020 at 15:03)</a>:</h4>
<p>no it wouldn't, but we can at least improve the error message</p>



<a name="221295326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221295326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221295326">(Dec 31 2020 at 15:04)</a>:</h4>
<p>saying something like: "it needs to be a valid rust code to get syntax highlighting. Consider using the <code>text</code> attribute instead"</p>



<a name="221295341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221295341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221295341">(Dec 31 2020 at 15:04)</a>:</h4>
<p>I think you mean <code>text</code> attribute, but yeah that seems a lot better</p>



<a name="221295615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/how%20does%20%60%60%60ignore%20work/near/221295615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/how.20does.20.60.60.60ignore.20work.html#221295615">(Dec 31 2020 at 15:09)</a>:</h4>
<p>indeed haha</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>